package com.xmgps.speech.controller;

import com.xmgps.speech.service.XunFeiSpeechUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping(value = "speech")
@RestController
public class SpeechController {

    @Autowired
    XunFeiSpeechUtil xunFeiSpeechUtil;

    @RequestMapping(value = "getSpeechByName")
    public Map<String,Object> getSpeechByName(@RequestParam(name = "name") String name){
        Map<String,Object> resultMap = new HashMap<>();
        xunFeiSpeechUtil.createFile(name);
        return resultMap;
    }


}
